﻿<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="aa.files/filelist.xml">
<title>Associative Arrays</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>MC SYSTEM</o:Author>
  <o:LastAuthor>MC SYSTEM</o:LastAuthor>
  <o:Revision>52</o:Revision>
  <o:TotalTime>322</o:TotalTime>
  <o:Created>2014-10-15T13:59:00Z</o:Created>
  <o:LastSaved>2014-10-22T10:30:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>591</o:Words>
  <o:Characters>3372</o:Characters>
  <o:Company>MC SYSTEM</o:Company>
  <o:Lines>28</o:Lines>
  <o:Paragraphs>7</o:Paragraphs>
  <o:CharactersWithSpaces>3956</o:CharactersWithSpaces>
  <o:Version>11.5606</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:UseFELayout/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;
	mso-font-alt:"ＭＳ 明朝";
	mso-font-charset:128;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-536870145 1791491579 18 0 131231 0;}
@font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-alt:SimSun;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
	{font-family:"\@MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;
	mso-font-charset:128;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-536870145 1791491579 18 0 131231 0;}
@font-face
	{font-family:"YaHei UI";
	panose-1:0 0 0 0 0 0 0 0 0 0;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:auto;
	mso-font-signature:0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;}
h4
	{mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	mso-outline-level:4;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;
	font-weight:bold;}
h5
	{mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	mso-outline-level:5;
	font-size:10.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;
	font-weight:bold;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
p
	{mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;}
code
	{mso-ansi-font-size:12.0pt;
	mso-bidi-font-size:12.0pt;
	font-family:宋体;
	mso-ascii-font-family:宋体;
	mso-fareast-font-family:宋体;
	mso-hansi-font-family:宋体;
	mso-bidi-font-family:宋体;}
pre
	{margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;}
tt
	{mso-ansi-font-size:12.0pt;
	mso-bidi-font-size:12.0pt;
	font-family:宋体;
	mso-ascii-font-family:宋体;
	mso-fareast-font-family:宋体;
	mso-hansi-font-family:宋体;
	mso-bidi-font-family:宋体;}
span.apple-converted-space
	{mso-style-name:apple-converted-space;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:42.55pt;
	mso-footer-margin:49.6pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:255291599;
	mso-list-template-ids:-856638434;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level2
	{mso-level-tab-stop:72.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level3
	{mso-level-tab-stop:108.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level4
	{mso-level-tab-stop:144.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level5
	{mso-level-tab-stop:180.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level6
	{mso-level-tab-stop:216.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level7
	{mso-level-tab-stop:252.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level8
	{mso-level-tab-stop:288.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l0:level9
	{mso-level-tab-stop:324.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1
	{mso-list-id:673653381;
	mso-list-template-ids:668918830;}
@list l1:level1
	{mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:72.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:"Courier New";
	mso-bidi-font-family:"Times New Roman";}
@list l1:level3
	{mso-level-tab-stop:108.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level4
	{mso-level-tab-stop:144.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level5
	{mso-level-tab-stop:180.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level6
	{mso-level-tab-stop:216.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level7
	{mso-level-tab-stop:252.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level8
	{mso-level-tab-stop:288.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1:level9
	{mso-level-tab-stop:324.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:普通表格;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="6146"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN link=blue vlink=blue style='tab-interval:21.0pt'>

<div class=Section1>

<h4 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;vertical-align:baseline'><span style='font-size:18.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033'>关联数组</span><span
lang=EN-US style='font-size:18.0pt;font-family:Arial;color:#000033'><o:p></o:p></span></h4>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;vertical-align:baseline;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>关联数组是大多数现代高级编程语言所具有的特色。</span><span
style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>它们有像</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'>mini</span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>数据库那样执行得非常快的数据结构，</span><span
style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>在很多程序里都普遍存在。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;vertical-align:baseline;
outline: 0px;orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;
background-position:initial initial;background-repeat:initial initial;
word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>在数组那节我们已经看到数组作为容器逐个存储元素，按索引访问它们。例如下面这个数组，存储了星期的英文名，它是这样定义的：</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='margin-top:6.0pt;
margin-right:0cm;margin-bottom:9.0pt;margin-left:0cm;background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>    </span><span
class=GramE>string[</span>] <span class=SpellE>dayNames</span> =<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>        </span><span
class=GramE>[ <span style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'>&quot;</span></span></span></span><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>Monday&quot;</span><span
lang=EN-US style='color:black'>, </span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;Tuesday&quot;</span></span><span
lang=EN-US style='color:black'>, </span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;Wednesday&quot;</span></span><span
lang=EN-US style='color:black'>, </span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;Thursday&quot;</span></span><span
lang=EN-US style='color:black'>,<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black'><span style='mso-spacerun:yes'>         </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Friday&quot;</span></span><span
lang=EN-US style='color:black'>, </span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;Saturday&quot;</span></span><span
lang=EN-US style='color:black'>, </span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;Sunday<span class=GramE>&quot;<span
style='font-size:12.0pt;color:black'> ]</span></span></span></span><span
lang=EN-US style='color:black'>;<o:p></o:p></span></pre></div>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>通过索引访问数组的英文日期名：</span><span lang=EN-US style='font-family:"Times New Roman";
color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>    </span><span
class=SpellE>writeln</span>(<span class=SpellE>dayNames</span>[1]);<span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>打印<span lang=EN-US> &quot;Tuesday&quot;<o:p></o:p></span></span></pre></div>

</span>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>事实上数组通过索引访问元素值可以被描述为索引与元素的关联。换句话说，数组映射索引到元素。但数组只能使用整数类型做索引。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>关联数组允许索引不只是整数而是任何类型。它们映射一种类型的值到另一种类型的值上。</span><span
style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>关联数组用于映射的类型<span
class=GramE>的值叫关键字</span>，而不是索引。它们提供通过每个元素的关键字访问元素的能力。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033'>非常快但无序</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033'><o:p></o:p></span></h5>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>关联数组是一个</span><span class=apple-converted-space><span lang=EN-US
style='font-family:"Times New Roman";color:black'>&nbsp;</span></span><i
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>hash</span></i><i><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>表</span></i><i><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='mso-spacerun:yes'>  </span></span></i><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black'>实现。</span><span lang=EN-US style='font-family:
"Times New Roman";color:black'> Hash </span><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black'>表是存储和访问元素的最快的集合。一般情况下，存取单个元素所花费的时间依赖于关联数组中元素的个数。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span lang=EN-US style='font-family:"Times New Roman";
color:black'>hash</span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>表的高性能的代价是元素的存储是无序的。不像数组，</span><span lang=EN-US style='font-family:
"Times New Roman";color:black'>hash</span><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black'>表的元素不是逐个排列的，也不是按某种方式排序的。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033'>定义</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033'><o:p></o:p></span></h5>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>关联数组的语法与数组相似，不同的是方框号中指定的是关键字的类型，而不是数组的长度：</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 5.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 5.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><i
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
style='font-size:10.0pt;color:black;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>元素类型</span></i><span lang=EN-US
style='color:black'>[</span><i style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span style='font-size:10.0pt;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>关键字</span></i><span
lang=EN-US style='color:black'>] </span><i style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span style='font-size:10.0pt;
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>关联数组名</span></i><span lang=EN-US style='color:black'>;<o:p></o:p></span></pre></div>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>例如</span><span lang=EN-US style='font-family:"Times New Roman";
color:black'>,</span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>下面这个关联数组，它把日期名的类型</span><span class=apple-converted-space><span
lang=EN-US style='font-family:"Times New Roman";color:black'>&nbsp;</span></span><code
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>string</span></b></code><span
lang=EN-US style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>映射到日期的数字类型</span><span
class=apple-converted-space><span lang=EN-US style='font-family:"Times New Roman";
color:black'>&nbsp;</span></span><span class=SpellE><code style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>int</span></b></code></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>：</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
class=SpellE><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span class=GramE><span lang=EN-US
style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>int</span></span></span></span><span
class=GramE><span lang=EN-US style='color:black'>[</span></span><span
lang=EN-US style='color:black'>string] <span class=SpellE>dayNumbers</span>;<o:p></o:p></span></pre></div>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span class=apple-converted-space><span
lang=EN-US style='font-family:"Times New Roman";color:black'>&nbsp;</span></span><span
class=apple-converted-space><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>关联数组变量</span></span><span class=SpellE><code><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>dayNumbers</span></b></code></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>，能被用作一个</span><span
style='font-family:"Times New Roman";color:black'> </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>从日期名映射到日期数字的表，换句话说，它能被用作这节开始处</span><span
style='font-family:"Times New Roman";color:black'> <span
class=apple-converted-space><span lang=EN-US>&nbsp;</span></span></span><span
class=SpellE><code style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>dayNames</span></b></code></span><span
class=apple-converted-space><span lang=EN-US style='color:black'>&nbsp;</span><span
style='color:black'>数组的逆转。</span></span><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black'>在下面的例子中我们将使用</span><span
class=apple-converted-space><span lang=EN-US style='font-family:"Times New Roman";
color:black'>&nbsp;</span></span><span class=SpellE><code style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>dayNumbers</span></b></code></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>关联数组。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>关联数组的关键字可以是任何类型，包括用户自定义的</span><span class=apple-converted-space><span
lang=EN-US style='font-family:"Times New Roman";color:black'>&nbsp;</span></span><span
class=SpellE><code style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>struct</span></b></code></span><span class=apple-converted-space><span
style='color:black'>和</span></span><span class=apple-converted-space><span
lang=EN-US style='font-family:"Times New Roman";color:black'>&nbsp;</span></span><code
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>class</span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black'>&nbsp;</span></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black'>类型。在稍后的章节中我们将看会看到用户自定义类型。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>当定义时，关联数组的长度不能被指定。它们会随着元素的增加自动增长。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033'>填加元素</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033'><o:p></o:p></span></h5>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black'>赋值运算符<span class=GramE>可以让键和</span>值构建关联：</span><span lang=EN-US
style='font-family:"Times New Roman";color:black'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'>// </span></span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>关联元素<span lang=EN-US> 0 </span>与键<span
lang=EN-US> &quot;Monday&quot;<o:p></o:p></span></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=SpellE><span
class=GramE>dayNumbers</span></span><span class=GramE>[</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Monday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>] </span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm;background:#FFFF88'>=</span></span><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> 0;<o:p></o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>关联元素<span lang=EN-US> 1 </span>与键<span
lang=EN-US> &quot;Tuesday&quot;<o:p></o:p></span></span></pre></span><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=SpellE><span
class=GramE>dayNumbers</span></span><span class=GramE>[</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Tuesday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>] </span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm;background:#FFFF88'>=</span></span><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> 1;<o:p></o:p></span></pre></div>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>随着每次关联，表自动增长。比如</span><span class=SpellE><code><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>dayNumbers</span></b></code></span><span
class=apple-converted-space><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&nbsp;</span></span><span class=apple-converted-space><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>在上面的操作后将有两个元素。这可以通过打印整个表来验证：</span></span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='margin-top:6.0pt;
margin-right:0cm;margin-bottom:9.0pt;margin-left:0cm;background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=SpellE><span
class=GramE>writeln</span></span><span class=GramE>(</span><span class=SpellE>dayNumbers</span>);<o:p></o:p></span></pre></div>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>下面的输出表明了元素值</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>0 </span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>和</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> 1 </span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>分别<span class=GramE>对应着键值</span></span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'> &quot;Monday&quot; </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>和</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'> &quot;Tuesday&quot;</span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>：</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:#E0E0E0;
margin-left:12.0pt;margin-right:12.0pt'><pre style='margin-top:6.0pt;
margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#E0E0E0;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><b><span
lang=EN-US style='font-size:10.0pt;color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>[&quot;Monday&quot;:0, &quot;Tuesday&quot;:1]<o:p></o:p></span></b></pre></div>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>每个键对应着一个元素，因而，赋值到一个存在的元素，表不会增长，相反，存在的元素值会被修改：</span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=SpellE>dayNumbers</span>[</span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Tuesday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>] = 222; <span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>修改存在的元素值<span lang=EN-US><o:p></o:p></span></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US><span style='mso-spacerun:yes'>    </span><span class=SpellE><span
class=GramE>writeln</span></span><span class=GramE>(</span><span class=SpellE>dayNumbers</span>);<o:p></o:p></span></pre></div>

</span>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>输出：</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:#E0E0E0;
margin-left:12.0pt;margin-right:12.0pt'><pre style='margin-top:6.0pt;
margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#E0E0E0;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><b><span
lang=EN-US style='font-size:10.0pt;color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>[&quot;Monday&quot;:0, &quot;Tuesday&quot;:222]<o:p></o:p></span></b></pre></div>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>初始化</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></h5>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>有时候一些键与值的映射在定义关联数组的时候就已经明确。关联数组的初始化与数组相似，不同的是用冒号分隔键与元素：</span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'>// </span></span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>键<span lang=EN-US> : </span>元素<span
lang=EN-US><o:p></o:p></span></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=SpellE><span class=GramE><span lang=EN-US style='font-size:10.0pt;
color:blue;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>int</span></span></span></span><span class=GramE><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>[</span></span><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>string] <span class=SpellE>dayNumbers</span> =<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span style='mso-spacerun:yes'>    </span><span
class=GramE>[ <span style='font-size:10.0pt;color:red'><span style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'>&quot;</span></span></span></span><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>Monday&quot;</span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span>: 0, </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Tuesday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> : 1, </span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:red;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&quot;Wednesday&quot;</span></span><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> : 2,<o:p></o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>         </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Thursday<span
class=GramE>&quot;<span style='font-size:12.0pt;color:black'> :</span></span></span><span
lang=EN-US> 3, </span></span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;Friday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>  </span>: 4, </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Saturday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>  </span>: 5,<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>         </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Sunday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span>: <span class=GramE>6 ]</span>;<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=SpellE>writeln</span>(<span
class=SpellE>dayNumbers</span>[</span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;Tuesday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>]);<span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>打印<span lang=EN-US> 1<o:p></o:p></span></span></pre></div>

</span>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>移除元素</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></h5>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>与<span class=GramE>键批配</span>的元素能被移除</span><span
class=apple-converted-space><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&nbsp;</span></span><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.<span class=GramE>remove(</span>)</span></b></code><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>:<o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=SpellE><span
class=GramE>dayNumbers.remove</span></span><span class=GramE>(</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Tuesday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>);<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>    </span><span
class=SpellE>writeln</span>(<span class=SpellE>dayNumbers</span>[</span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Tuesday&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>]);<span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>← 运行时错误<span lang=EN-US><o:p></o:p></span></span></pre></div>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'>上面第<span class=GramE>一行为键</span></span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Tuesday&quot;</span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>移除元素。元素不再存在于容器中，</span><span
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'> </span><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>因而第二行将引发一个异常，如果异常没有被捕获，程序将终止。在稍后的章节我们将看到一些异常。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>在下面的第一个练习中我们将会看到一次性移除所有元素是可能的。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>确定元素是否存在</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></h5>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span class=apple-converted-space><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><code
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>in</span></b></code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>操作符</span><span
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'> </span><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>确定在关联数组中一个给定的键是否拥有元素：</span><span lang=EN-US style='font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
class=SpellE><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span class=GramE><span lang=EN-US
style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>int</span></span></span></span><span
class=GramE><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>[</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>string] <span class=SpellE>colorCodes</span> = [ </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>/* ... */</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> ];<o:p></o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>if</span></span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> (</span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:red;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&quot;purple&quot;</span></span><span lang=EN-US style='color:
black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> </span><span lang=EN-US style='font-size:10.0pt;color:blue;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'>in</span></span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> <span class=SpellE>colorCodes</span>) {<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>       </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>有一个元素与键<span lang=EN-US> &quot;purple&quot;</span>对应<span
lang=EN-US><o:p></o:p></span></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US><o:p>&nbsp;</o:p></span></pre></span><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span>} </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>else</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> {<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>       </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>没有元素与键<span lang=EN-US> &quot;purple&quot;</span>对应<span
lang=EN-US><o:p></o:p></span></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US><span style='mso-spacerun:yes'>    </span>}<o:p></o:p></span></pre></div>

</span>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>有时候在关联数组中，为不存在的键使用一个默认值是有道理的。例如，特殊值</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'> -1 </span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>能被用作</span><span
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'> </span><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>不存在的</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>colors </span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>的代码。</span><span class=apple-converted-space><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><span
class=SpellE><code style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>colorCodes</span></b></code><span lang=EN-US style='font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>.</span><code style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>.get</span></b></code></span><code><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>()</span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>在这样的样例中是有用的：如果指定<span
class=GramE>键存在</span>元素，它返回元素，否则返回默认值。默认值被指定为</span><code><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.get()</span></b></code><code><b><span
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>的</span></b></code><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>第二个参数：</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
class=SpellE><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span class=GramE><span lang=EN-US
style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>int</span></span></span></span><span
class=GramE><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>[</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>string] <span class=SpellE>colorCodes</span> = [ </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;blue&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> : 10, </span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:red;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&quot;green&quot;</span></span><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'> : 20 ];<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=SpellE><span
class=GramE>writeln</span></span><span class=GramE>(</span><span class=SpellE>colorCodes.get</span>(</span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;purple&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>, </span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm;background:#FFFF88'>-1</span></span><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>));<o:p></o:p></span></pre></div>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>键</span><tt><span lang=EN-US style='font-size:10.0pt;color:red;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;purple&quot;</span></tt><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>的元素不在数组中，因而</span><code><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>.get</span><span lang=EN-US
style='border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>()</span></b></code><span class=apple-converted-space><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&nbsp;</span></span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>返回</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> -1</span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>：</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:#E0E0E0;
margin-left:12.0pt;margin-right:12.0pt'><pre style='margin-top:6.0pt;
margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:#E0E0E0;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><b><span
lang=EN-US style='font-size:10.0pt;color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>-1<o:p></o:p></span></b></pre></div>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>属性</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></h5>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.length</span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>返回数组元素的个数。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.keys</span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span><span
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>返回关联数组中全部的键的动态数组副本。</span></span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.<span class=SpellE>byKey</span></span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span><span
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>访问关联数组的键的原始值；</span></span><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>在下一章节我们将会看到在</span><span class=apple-converted-space><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><span
class=SpellE><code style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><b><span lang=EN-US style='font-size:14.5pt;
color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>foreach</span></b></code></span><span class=apple-converted-space><span
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>循环中如何使用</span></span><code><b><span lang=EN-US style='font-size:
14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>.<span class=SpellE>byKey</span></span></b></code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.values</span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span><span
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>返回关联数组中全部的值的动态数组副本。</span></span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
class=apple-converted-space><span lang=EN-US style='font-size:10.0pt;
mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.<span class=SpellE>byValue</span></span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span><span
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>访问关联数组的元素的原始值。</span><span lang=EN-US><o:p></o:p></span></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.rehash</span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span><span
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>在一些例子中可以让数组更有效率，比如在实际开始使用关联数组前插入了大量元素。</span></span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.<span class=SpellE>sizeof</span></span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>数组大小</span><span
class=apple-converted-space><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&nbsp;</span></span><i style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>参考</span></i><span class=apple-converted-space><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>(</span><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>它不影响元素的个数，对全部关联数组来说值是一样的</span><span lang=EN-US style='font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>)</span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>。</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.get</span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>元素存在就返回，否则是默认值。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:12.0pt;margin-bottom:
0cm;margin-left:24.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;mso-line-height-alt:
14.25pt;mso-list:l0 level1 lfo2;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.remove</span></b></code><span
class=apple-converted-space><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>从数组中移除指定元素。</span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>样例</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></h5>

<p style='margin-top:9.0pt;margin-right:12.0pt;margin-bottom:9.0pt;margin-left:
12.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>这是一段打印“</span><span style='font-size:14.0pt;mso-ascii-font-family:
"YaHei UI";mso-hansi-font-family:"YaHei UI";color:#444444;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm;background:white'>土耳其<span
srcinfo="17:22" dstinfo="3:4" paragraphname=paragraph0 style='orphans: auto;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px'
id="ouHighlight__17_22TO3_4">”</span><span style='border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>颜色<span srcinfo="14:15" dstinfo="5:5"
paragraphname=paragraph0 style='orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px' id="ouHighlight__14_15TO5_5"></span></span>名称</span>的程序，它的关键字指定为英文：<span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

</span>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:12.0pt;margin-right:12.0pt'><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;orphans: auto;
text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:
initial initial;background-repeat:initial initial;word-spacing:0px'><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>import</span></span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> <span class=SpellE>std.stdio</span>;<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
class=GramE><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:blue;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>import</span></span></span><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'> <span
class=SpellE>std.string</span>;<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span class=GramE><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>void</span></span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> main()<o:p></o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>{<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>    </span><span
class=GramE>string[</span>string] colors = [ </span><span style='outline: 0px;
background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;black&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> : </span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:red;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&quot;<span class=SpellE>siyah</span>&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>,<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>                             </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;<span class=GramE>white</span>&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> : </span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:red;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&quot;<span class=SpellE>beyaz</span>&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>,<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>                             </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;red&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span>: </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;k</span><span
style='font-size:10.0pt;font-family:"MS Mincho";mso-bidi-font-family:"MS Mincho";
color:red;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>ı</span><span class=SpellE><span lang=EN-US style='font-size:10.0pt;
color:red;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>rm</span></span><span style='font-size:10.0pt;font-family:"MS Mincho";
mso-bidi-font-family:"MS Mincho";color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>ı</span><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>z</span><span style='font-size:10.0pt;
font-family:"MS Mincho";mso-bidi-font-family:"MS Mincho";color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>ı</span><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;</span></span><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>,<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>                             </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;green&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> : </span><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.0pt;
color:red;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&quot;ye</span><span style='font-size:10.0pt;font-family:"MS Mincho";
mso-bidi-font-family:"MS Mincho";color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>ş</span><span class=SpellE><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>il</span></span><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>,<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>                             </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;<span class=GramE>blue</span>&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>  </span>: </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;<span class=SpellE>mavi</span>&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>                      </span><span style='mso-spacerun:yes'>      </span>];<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=SpellE><span
class=GramE>writefln</span></span><span class=GramE>(</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;I know the Turkish names of these %s colors: %s&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>,<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>       </span><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'>     </span><span
class=SpellE>colors.length</span>, <span class=SpellE>colors.keys</span>);<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span><span class=GramE>write(</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;Please ask me one: &quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>);<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>    </span><span
class=GramE>string</span> <span class=SpellE>inEnglish</span> = chomp(<span
class=SpellE>readln</span>());<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=GramE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>if</span></span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> (<span class=SpellE>inEnglish</span> </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>in</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> colors) {<o:p></o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'>     </span><span
class=SpellE><span class=GramE>writefln</span></span><span class=GramE>(</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;\&quot;%s\&quot; is \&quot;%s\&quot; in Turkish.&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>,<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>           </span><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'>     </span><span
class=SpellE><span class=GramE>inEnglish</span></span>, colors[<span
class=SpellE>inEnglish</span>]);<o:p></o:p></span></pre><pre style='background:
white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p>&nbsp;</o:p></span></pre><pre style='background:white;
vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span>} </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>else</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> {<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'>     </span><span
class=SpellE><span class=GramE>writeln</span></span><span class=GramE>(</span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;I don't know that one.&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>);<o:p></o:p></span></pre><pre style='background:white;vertical-align:
baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;padding:0cm;
mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US style='color:black;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-spacerun:yes'>    </span>}<o:p></o:p></span></pre><pre
style='background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>}<o:p></o:p></span></pre></div>

<h5 style='margin-top:15.0pt;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:
6.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span style='font-size:15.0pt;mso-ascii-font-family:
Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:Arial;color:#000033;
border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;padding:0cm'>练习</span><span
lang=EN-US style='font-size:15.0pt;font-family:Arial;color:#000033;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></h5>

<p class=MsoNormal style='margin-top:6.0pt;margin-right:12.0pt;margin-bottom:
0cm;margin-left:30.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;line-height:
14.25pt;mso-list:l1 level1 lfo4;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-family:"Times New Roman";mso-fareast-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>怎样才能移除关联数组的全部元素？至少有三种方法：</span><span lang=EN-US style='font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:6.0pt;margin-right:24.0pt;margin-bottom:
0cm;margin-left:54.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;line-height:
14.25pt;mso-list:l1 level2 lfo4;tab-stops:list 72.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Courier New";
mso-fareast-font-family:"Courier New";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-list:Ignore'>o<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>逐个从关联数组中移除。</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:6.0pt;margin-right:24.0pt;margin-bottom:
0cm;margin-left:54.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;line-height:
14.25pt;mso-list:l1 level2 lfo4;tab-stops:list 72.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Courier New";
mso-fareast-font-family:"Courier New";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-list:Ignore'>o<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>用一个空的关联数组赋值。</span><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0cm;margin-right:24.0pt;margin-bottom:
0cm;margin-left:54.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;line-height:
14.25pt;mso-list:l1 level2 lfo4;tab-stops:list 72.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Courier New";
mso-fareast-font-family:"Courier New";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><span style='mso-list:Ignore'>o<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>与前一个方法相似，</span><span style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'> </span><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>指定元素的</span><span class=apple-converted-space><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><code
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>.init</span></b></code><code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>属性</span></code><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:
66.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline'><b style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><i style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>备注</span></i></b><b><i><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>:</span></i></b><span class=apple-converted-space><i><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&nbsp;</span><span style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>任何变量或类型的</span></i></span><span
class=apple-converted-space><i><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>&nbsp;</span></i></span><code style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><b><i><span lang=EN-US
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>.init</span></i></b></code><span
class=apple-converted-space><i><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></i></span><i><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>属性</span></i><i><span
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'> </span></i><span class=GramE><i><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>是类型</span></i></span><i><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>的初始值</span></i><i><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>:</span></i><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:66.0pt;margin-right:36.0pt'><pre style='line-height:14.25pt;
background:white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>    </span>number = </span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
class=SpellE><span lang=EN-US style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>int</span><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>.init</span></span><span lang=EN-US>;<span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// 0 </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>是<span class=SpellE><span lang=EN-US>int</span></span>的初始值<span
lang=EN-US><o:p></o:p></span></span></pre></div>

<p class=MsoNormal style='margin-top:6.0pt;margin-right:12.0pt;margin-bottom:
0cm;margin-left:30.0pt;margin-bottom:.0001pt;text-indent:-18.0pt;line-height:
14.25pt;mso-list:l1 level1 lfo4;tab-stops:list 36.0pt;vertical-align:baseline'><![if !supportLists]><span
lang=EN-US style='font-family:"Times New Roman";mso-fareast-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>和数组一样，每个键对应一个值。对某些程序来说可能是个限制。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p style='margin-top:9.0pt;margin-right:24.0pt;margin-bottom:9.0pt;margin-left:
42.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>假设使用关联数组来存储学生成绩。比如，我们假设存储学生</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;<span class=SpellE>emre</span>&quot;</span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>的成绩</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>90, 85, 95</span><span
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:24.0pt;margin-bottom:0cm;margin-left:
42.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span style='mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>在</span><span class=apple-converted-space><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&nbsp;</span></span><code
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><b><span
lang=EN-US style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>grades[&quot;<span
class=SpellE>emre</span>&quot;]</span></b></code><code><b><span
style='font-size:14.5pt;color:#002222;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>中，</span></b></code><span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>关联数组通过学生姓名很容易获得它的成绩，然而，在下面的代码中不能插入成绩，因为每个成绩将覆盖前一个：</span><span
lang=EN-US style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<div style='mso-element:para-border-div;border:dotted #99CC99 1.0pt;mso-border-alt:
dotted #99CC99 .75pt;padding:6.0pt 6.0pt 6.0pt 6.0pt;background:white;
margin-left:42.0pt;margin-right:24.0pt'><pre style='line-height:14.25pt;
background:white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt;outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span></span><span
class=SpellE><span style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span class=GramE><span lang=EN-US
style='font-size:10.0pt;color:blue;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>int</span></span></span></span><span
class=GramE><span lang=EN-US style='color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>[</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>string] grades;<o:p></o:p></span></pre><pre style='line-height:
14.25pt;background:white;vertical-align:baseline;border:none;mso-border-alt:
dotted #99CC99 .75pt;padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'>  </span><span
class=GramE>grades[</span></span><span style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span lang=EN-US
style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>&quot;<span class=SpellE>emre</span>&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>] = 90;<o:p></o:p></span></pre><pre style='line-height:14.25pt;
background:white;vertical-align:baseline;border:none;mso-border-alt:dotted #99CC99 .75pt;
padding:0cm;mso-padding-alt:6.0pt 6.0pt 6.0pt 6.0pt'><span lang=EN-US
style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'>  </span>grades[</span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:red;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>&quot;<span class=SpellE>emre</span>&quot;</span></span><span
lang=EN-US style='color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>] = 85;<span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'> </span></span><span
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'>// </span><span
style='font-size:10.0pt;color:green;border:none windowtext 1.0pt;mso-border-alt:
none windowtext 0cm;padding:0cm'>←覆盖前一个成绩！<span lang=EN-US><o:p></o:p></span></span></pre></div>

<p style='margin-top:9.0pt;margin-right:24.0pt;margin-bottom:9.0pt;margin-left:
42.0pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;background-position:initial initial;
background-repeat:initial initial'>怎么解决这个问题？ <span style='mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'></span>定义一个能存储每个学生的多个成绩的关联数组。</span><span lang=EN-US
style='font-family:"Times New Roman";color:black;border:none windowtext 1.0pt;
mso-border-alt:none windowtext 0cm;padding:0cm'><o:p></o:p></span></p>

<p style='margin-top:0cm;margin-right:12.0pt;margin-bottom:0cm;margin-left:
12.0pt;margin-bottom:.0001pt;line-height:14.25pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:
initial initial;word-spacing:0px'><span lang=EN-US style='font-family:"Times New Roman";
color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'><a href="http://ddili.org/ders/d.en/aa.cozum.html"
target="ddili_cozum" style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><i style='outline: 0px;background-position:
initial initial;background-repeat:initial initial'><span style='color:purple;
text-decoration:none;text-underline:none'>... </span></i><i><span lang=EN-US
style='font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman";color:purple;text-decoration:none;text-underline:none'><span
lang=EN-US>解答</span></span></i></a><o:p></o:p></span></p>

<p class=MsoNormal align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
vertical-align:baseline'><span lang=EN-US style='font-size:11.0pt;font-family:
"Times New Roman";color:black;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
padding:0cm'>[<span class=apple-converted-space>&nbsp;</span><a
href="dowhile.html" style='outline: 0px;background-position:initial initial;
background-repeat:initial initial'><span lang=EN-US style='font-size:10.5pt;
font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman";color:purple;text-decoration:none;text-underline:none'><span
lang=EN-US>前一节</span></span><span style='font-size:10.5pt;color:purple;
text-decoration:none;text-underline:none'>&nbsp;</span></a>] &nbsp; [<span
class=apple-converted-space>&nbsp;</span><a href="foreach.html"
style='outline: 0px;background-position:initial initial;background-repeat:initial initial'><span
lang=EN-US style='font-size:10.5pt;font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";color:purple;text-decoration:none;
text-underline:none'><span lang=EN-US>后一节</span></span><span style='font-size:
10.5pt;color:purple;text-decoration:none;text-underline:none'>&nbsp;</span></a>]<o:p></o:p></span></p>

</span></div>

</body>

</html>
